#ifndef _POINTCLOUDFILTER_H
#define _POINTCLOUDFILTER_H

#include <cstdint>
#include <algorithm>
#include <vector>
#include <iostream>

namespace obstacle_detector
{

class PointCloudFilter
{
public:
	PointCloudFilter();
	~PointCloudFilter(){};
	bool remove_ground(int16_t* points,int &point_num);

private:
	void generate_point_index(int point_num);

private:
	const int RANSAC_iter_=500;
	const int select_num_=3;
	const float threshold_=0.2;

	// float *plane_params_;
	float *plane_params_gpu_;
	int *inlier_count_gpu_;
	int *inlier_count_;
	int *inlier_index_gpu_;
	float *least_square_sum_gpu_;
	int *point_index_gpu_;
	int16_t *filtered_points_gpu_;
	int *filtered_points_num_gpu_;


};//class

}//namespace

#endif